<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="/resources/css/admin/ban/banList.css">
	<script type="text/javascript" src="/resources/js/admin/ban/banList.js"></script>
<title>/admin/ban/banList.jsp</title>
</head>
<body>	
	<div id="banlist"><br>
	<div id="top">관리자 >반관리>반정보페이지</div>
		<h1 id="bantop">반정보페이지</h1>
		<div id="addban">
			<a href="/admin/ban/addBanForm" title="반추가버튼" id="addbanb">[반추가]</a>
		</div>
		<table>			
			<tr>
				<th>번호</th>
				<th>반명</th>
				<th>시작일</th>
				<th>종료일</th>
				<th>비고</th>			
			</tr>
			<c:forEach var="ban" items="${banList}">
			<tr>
				<td>${ban.banIdx}</td>
				<td>${ban.banName}</td>
				<td>${ban.banStart}</td>
				<td>${ban.banEnd}</td>
				<td>
					<input type="submit" value="수정">
					<input type="submit" value="삭제">
				</td>			
			</tr>			
			</c:forEach>
			<tr >
				<td id="pagingb" colspan="5" >
			<c:if test="${currentPage > 1}">
				<a href="/admin/ban/getBansByCurrentPage/1" id="pagingb">[처음]</a>
				<a href="/admin/ban/getBansByCurrentPage/${currentPage-1}" id="pagingb">[이전]</a>
			</c:if>
				[${currentPage}]				
			<c:if test="${currentPage < endPage}">	
				<a href="/admin/ban/getBansByCurrentPage/${currentPage+1}" id="pagingb">[다음]</a>
				<a href="/admin/ban/getBansByCurrentPage/${endPage}" id="pagingb">[끝]</a>
			</c:if>
				</td>	
			</tr>		
		</table>
	</div>
		
	<form id="searchbox" action="">
	    <input id="search" type="text" placeholder=" 검색어를 검색해 주세요." size="60">
	    <input id="submit" type="submit" value="Search">
	</form>	
</body>
</html>